import { useState } from 'react'
import logo from './logo.svg'
import './App.css'
import { ColorBrowser } from './components/colorBrowser'
import ColorPicker from './components/colorPicker'
import { Color } from './model/color'

function App() {
  // use命名开始的一个钩子函数 <>
  const [color, setColor] = useState<Color>({
    red:20,
    green:40,
    blue:180
  })

  return (
    <>
    <ColorPicker onColorUpdated={setColor} color={color}></ColorPicker>
      <ColorBrowser color={color} />
    </>
    
  )
}

export default App
